import numpy as np
from pylab import *
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.image as mpimg
from Sector_Parameters import *

font = {'family' : 'monospace', 'weight' : 'bold', 'size'   : 40}
mpl.rc('font', **font)  # pass in the font dict as kwargs
mpl.rcParams['axes.linewidth'] = 10

Nr,Nt,Nz,dr,dt,dz,Np,NN,Nx,Nw,Ny,Nv,N_p, Nx_aug,sigma_pnts=circular_parameters()
DeltaT, Tsim, Nsim=time_parameters()



def surface_parameters_orig(d,par,str1, filename):
    Z_new = d
    fig=plt.figure(figsize=(25,25))
    ax=Axes3D(fig)
    r_new=linspace(0,290,13)
    th_new = np.linspace(np.pi, np.pi/2, 45)
    R, TH = meshgrid(r_new, th_new)
    m=plt.subplot(projection="polar")
    m.set_xticklabels([])
    m.grid(linewidth=5, color='k')
    xlim([pi,pi/2])
    m.set_yticklabels([])
    colorList = ['#999900', '#33CC00', '#3366CC']
    cmap = matplotlib.colors.ListedColormap(colorList)
    bounds = [0.,1.,2.,3.]
    ticks = [0.5,1.5,2.5]
    p = plt.pcolormesh(TH,R,Z_new,cmap=cmap, vmin = 0, vmax=3, shading='flat')
    theta_ticks = np.linspace(np.pi, np.pi/2, 45)*180/np.pi
    plt.thetagrids([theta for theta in theta_ticks])
    plt.rgrids([r for r in np.linspace(0,290,13)])
    plt.grid()
    cbar = fig.colorbar(p, aspect = 20, ticks=ticks, shrink=0.8)
    cbar.set_ticklabels(['MZ$_1$','MZ$_2$','MZ$_3$'])
    cbar.set_label(label='Legend', weight='bold', family='monospace', size=40, labelpad= 14)
    fig.tight_layout()
    plt.savefig('./results/MZs_Q4.jpg')
    plt.show()
